package com.next

class Message
{
    String cellphone

    Date createdDate = new Date()
    Date modifiedDate = new Date()

    String platform
    String ip
    String text

    String status = "Pending"
    String type = 'SMS'

    String returnCode
    String returnMessage

    static constraints = {
        cellphone size: 11..11
        platform maxSize: 64
        text maxSize: 128
        type maxSize: 6
        status inList: ["Pending", "Succesful", "Failed"]
        cellphone nullable: true, blank: true
        ip nullable: true, blank: true, maxSize: 32
        returnMessage nullable: true, blank: true, maxSize: 256
        returnCode maxSize: 6
    }
}
